﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Mund.Sharepoint.Publishing.WebParts.SearchBox
{
    class SearchClass:EditorPart
    {
       public DropDownList ddlChooseItem = new DropDownList();
        protected override void CreateChildControls()
        {
            ddlChooseItem.Width = 130;
            ddlChooseItem.Height = 22;
            this.Controls.Add(ddlChooseItem);
        }
        public override bool ApplyChanges()
        {
            EnsureChildControls();
            SearchBox webPart = this.WebPartToEdit as SearchBox;
            if (ddlChooseItem.SelectedValue != webPart.SelectedScope.ToString())
            {
                
            }
            return true;
            
        }

        public override void SyncChanges()
        {
            EnsureChildControls();
            SearchBox webPat = this.WebPartToEdit as SearchBox;
            ddlChooseItem.SelectedItem.Text = webPat.SelectedScope.ToString();
            return;
        }
    }
}
